<?php 
// Debug::print_r($this->productDetails);
if(isset($this->productDetails)){?>
<div class="bread">
	<ul>
	<li><a href="#">Trang chủ</a></li>
	<li>&gt;</li>
	<li><a href="<?php echo URLUltil::productCat1($this->getContext(), $this->productDetails['catid'], $this->productDetails[Product::CATNAME])?>">
	<?php echo $this->productDetails[Product::CATNAME]?></a></li>
	<li>&gt;</li>
	<li><span><?php echo $this->productDetails[Product::NAME]?></span></li>
	</ul>
</div>
<div class="content">
	<div class="pro-detail">
		<div class="pro-info">
			<div class="image"><img alt="<?php echo $this->productDetails[Product::NAME] ?>" src="<?php echo $this->imageURL($this->productDetails[Product::IMAGE])?>"></div>
			<div class="description">
				<h2 class="name"><?php echo $this->productDetails[Product::NAME]?></h2>
				<span class="price"><?php echo FormatUtil::formatFloat($this->productDetails[Product::PRICE1],".")?> đ</span>
				<div class="desc"><?php echo $this->productDetails[Product::DESCRIPTION]?></div>
				<?php 
				if(isset($this->productDetails[Product::WARRANTY]) && $this->productDetails[Product::WARRANTY] != '0')
					echo '<div class="warranty">Bảo hành chính hãng <b>'.$this->productDetails[Product::WARRANTY].' tháng</b>.</div>';
				?>
				<div class="booking">
					<div class="order">
						<button>Đặt hàng</button>
					</div>
					<div class="support">
						<div class="srow">Bảo hành 1 đổi 1, quý khách xem chi tiết tại <a href="#Quy-dinh-bao-hanh">đây</a></div>
						<div class="srow">Gọi đặt hàng & tư vấn : <b>0903 948 996</b> hoặc <b>0989 726 017</b>.</div>
						<div class="srow">Xem hướng dẫn mua hàng tại <a href="#">đây</a></div>
						<div class="srow">Quý khách lấy số lượng lớn vui lòng liên hệ <b>0903 948 996</b> để có giá tốt.</div>
					</div>
				</div>
				<?php 
				if(isset($this->productDetails[Product::REMARK]) && $this->productDetails[Product::REMARK] != "")
					echo '<div class="note">'.$this->productDetails[Product::REMARK].'</div>';
				?>
			</div>
			<div class="clear"></div>
			<div class="moreinfo">
				<div class="album">
					<div class="imagelist"></div>
					<div class="social">
					<?php
					$this->block('FBLike',URLUltil::productDetails($this->getContext(), $this->productDetails[Product::ID]));
					$this->block('GPlus',$this->getContext());
					?>
					</div>
				</div>
			</div>
		</div>
		<div class="related pro-list">
			<div class="border-br">
			<?php //Debug::print_r($this->relatedCats);
			foreach ($this->relatedCats as $value) {
				echo '<div class="pro">';
				echo '<div class="border-lt">';
				echo '<a class="image" href="'.$value['link'].'">
		<img alt="'.$value[Product::NAME].'" src="'.$this->imageURL($value[Product::IMAGE]).'"></a>';
				echo '<div class="info">';
				echo '<a class="name" href="'.$value['link'].'">'.$value[Product::NAME].'</a>';
				echo '<span class="price">'.FormatUtil::formatFloat($value[Product::PRICE1],'.').' đ</span>';
				echo '</div>';
				echo '</div>';
				echo '</div>';
			}
			
			
			/* 
			for ($i = 1; $i < 9; $i++) {
				echo '<div class="pro">';
				echo '<div class="border-lt">';
				echo '<a class="image" href="'.URLUltil::productDetails($this->getContext(), $i).'"><img src="'.$this->getContext()->getBaseURL().'public/images/product/'.$i.'.jpg"></a>';
				echo '<div class="info">';
				echo '<a class="name" href="'.URLUltil::productDetails($this->getContext(), $i).'">TD-8817</a>';
				echo '<span class="price">2.285.000 đ</span>';
				echo '</div>';
				echo '</div>';
				echo '</div>';
			} */
			?>
			</div>
		</div>
	</div>
	<div class="botinfo">
		<div class="incat pro-list">
			<div class="border-br">
			<?php foreach ($this->relatedTypes as $value) {
				echo '<div class="pro">';
				echo '<div class="border-lt">';
				echo '<a class="image" href="'.$value['link'].'"><img alt="'.$value[Product::NAME].'" src="'.$this->imageURL($value[Product::IMAGE]).'"></a>';
				echo '<div class="info">';
				echo '<a class="name" href="'.$value['link'].'">'.$value[Product::NAME].'</a>';
				echo '<span class="price">'.FormatUtil::formatFloat($value[Product::PRICE1],'.').' đ</span>';
				echo '</div>';
				echo '</div>';
				echo '</div>';
			}?>
			</div>
		</div>
		<div class="attribute">
			<h3 class="title">Thông tin chi tiết</h3>
			<div class="productinfo fullcontent">
				<?php echo $this->productDetails[Product::DETAILS]?>
			</div>
			<div class="tag">
				
			</div>
		</div>
	</div>
	<div class="other">
	</div>
</div>
<?php }?>